package edu.ccut.saturn.workflow.parse;


import edu.ccut.saturn.component.IParameterContext;
import edu.ccut.saturn.component.SaturnWorkFlowManager;
import edu.ccut.saturn.workflow.model.WorkFlowInfo;

public class ParseWorkFlowFromStream extends ParseWorkFlow {
	@Override
	public void execute(IParameterContext parameterContext) throws Exception {
		debug("start ParseWorkFlowXml",parameterContext);
		String fullkey = (String) parameterContext.getParameterValue(1);
		byte[] xml = SaturnWorkFlowManager.getInstance().getInputStream(fullkey);
		WorkFlowInfo workflowInfo = parseXml(xml);
		parameterContext.setParameter(0, workflowInfo);
	}

	
}